% HYBRID Code solver

% From scratch
clear all
close all
clc

% Solver parameters
SOLVER_Initialization

% Hybird Rocket Engine initialization
HRM_Initialization

% Saving initial state
save HYBRID_Code_init HRM ATM SOLVER

% Temporal loop
for i_t=1:length(SOLVER.t)
    
    % Modules applied to HRM(i) giving HRM(i+1)
    SOLVER_Module_Grain_Temp
    SOLVER_Module_Tank_Thermodynamics
    SOLVER_Module_Trajectography
    %module4
    %module5
    
    HRM(i_t+1)=HRM(i_t);
    
end
% End of temporal loop

% Saving final state
save HYBRID_Code_result HRM ATM SOLVER

% Post-processing
POSTPROC_Run